package com.whq.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whq.dao.PowerUsedCostLogMapper;
import com.whq.entity.PowerUsedCostLog;
import com.whq.service.PowerUsedCostLogService;

@Service(value = "tdPowerUsedCostLogService")
public class PowerUsedCostLogServiceImpl implements PowerUsedCostLogService {

    @Autowired
    private PowerUsedCostLogMapper<PowerUsedCostLog>tdPowerUsedCostLogMapper;
    
    @Override
    public Integer insertSelective(PowerUsedCostLog tdPowerUsedCostLog) throws Exception {
           return this.tdPowerUsedCostLogMapper.insertSelective(tdPowerUsedCostLog);
        }

    @Override
    public Integer insertBatch(List<PowerUsedCostLog> tdPowerUsedCostLog) throws Exception {
           return this.tdPowerUsedCostLogMapper.insertBatch(tdPowerUsedCostLog) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.tdPowerUsedCostLogMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.tdPowerUsedCostLogMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(PowerUsedCostLog tdPowerUsedCostLog) {
           return this.tdPowerUsedCostLogMapper.updateByPrimaryKeySelective(tdPowerUsedCostLog);
    }

    @Override
    public PowerUsedCostLog findById(Object id) {
           return (PowerUsedCostLog) this.tdPowerUsedCostLogMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<PowerUsedCostLog> selectByCondition(PowerUsedCostLog tdPowerUsedCostLog) {
           return (List<PowerUsedCostLog>) this.tdPowerUsedCostLogMapper.selectByCondition(tdPowerUsedCostLog);
    }

    @Override
    public Integer selectCountByCondition(PowerUsedCostLog tdPowerUsedCostLog) {
           return  this.tdPowerUsedCostLogMapper.selectCountByCondition(tdPowerUsedCostLog);
    }

}
